<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.text.Properties</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.text.Properties";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.text.Properties.html" class="symbol">tango.text.Properties</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Initial release: May 2004
<p class="sec_header">Author:</p>Kris
<p class="sec_header"><span class="red">Deprecated:</span></p>Please use tango.io.stream.MapStream instead
<dl>
<dt class="decl">class <a class="symbol _class" name="Properties" href="./htmlsrc/tango.text.Properties.html#L34" kind="class" beg="34" end="151">Properties</a><span class="tparams">(T)</span>; <a title="Permalink to this symbol" href="#Properties" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L34">#</a></dt>
<dd class="ddef">
<div class="summary">Provides load facilities for a properties file. That is, a file
        or other medium containing lines of text with a name=value layout.</div>
<dl>
<dt class="decl">void <a class="symbol _function" name="Properties.load" href="./htmlsrc/tango.text.Properties.html#L43" kind="function" beg="43" end="46">load</a><span class="params">(FilePath <em>path</em>, void delegate (T[] name, T[] value) <em>dg</em>)</span>; <span class="attrs">[<span class="stc">static</span>, <span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#Properties.load" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L43">#</a></dt>
<dd class="ddef">
<div class="summary">Load properties from the named file, and pass each of them
                to the provided delegate.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Properties.load:2" href="./htmlsrc/tango.text.Properties.html#L57" kind="function" beg="57" end="64">load</a><span class="params">(char[] <em>path</em>, void delegate (T[] name, T[] value) <em>dg</em>)</span>; <span class="attrs">[<span class="stc">static</span>, <span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#Properties.load:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L57">#</a></dt>
<dd class="ddef">
<div class="summary">Load properties from the named file, and pass each of them
                to the provided delegate.</div>
<p class="sec_header">Since:</p>0.99.7</dd>
<dt class="decl">void <a class="symbol _function" name="Properties.load:3" href="./htmlsrc/tango.text.Properties.html#L85" kind="function" beg="85" end="102">load</a><span class="params">(InputStream <em>stream</em>, void delegate (T[] name, T[] value) <em>dg</em>)</span>; <span class="attrs">[<span class="stc">static</span>, <span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#Properties.load:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L85">#</a></dt>
<dd class="ddef">
<div class="summary">Load properties from the provided buffer, and pass them to
                the specified delegate.</div>
We use an iterator to sweep text lines, and extract lValue
                and rValue pairs from each one, The expected file format is
                as follows:
<p class="bl"/>
                <pre class="d_code">
<p class="error L">tango.text.Properties(5,1)L: expected 'line' after '#'.</p>
<span class="i">x</span> = <span class="i">y</span>
<span class="i">abc</span> = <span class="n">123</span>
<span class="i">x</span>.<span class="i">y</span>.<span class="i">z</span> = <span class="k">this</span> <span class="k">is</span> <span class="i">a</span> <span class="i">single</span> <span class="i">property</span>

<span class="hl">#</span> <span class="k">this</span> <span class="k">is</span> <span class="i">a</span> <span class="i">comment</span> <span class="i">line</span>
</pre></dd>
<dt class="decl">void <a class="symbol _function" name="Properties.save" href="./htmlsrc/tango.text.Properties.html#L110" kind="function" beg="110" end="113">save</a><span class="params">(FilePath <em>path</em>, T[][T[]] <em>properties</em>)</span>; <span class="attrs">[<span class="stc">static</span>, <span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#Properties.save" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L110">#</a></dt>
<dd class="ddef">
<div class="summary">Write properties to the provided filepath</div></dd>
<dt class="decl">void <a class="symbol _function" name="Properties.save:2" href="./htmlsrc/tango.text.Properties.html#L123" kind="function" beg="123" end="129">save</a><span class="params">(char[] <em>path</em>, T[][T[]] <em>properties</em>)</span>; <span class="attrs">[<span class="stc">static</span>, <span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#Properties.save:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L123">#</a></dt>
<dd class="ddef">
<div class="summary">Write properties to the provided filepath</div>
<p class="sec_header">Since:</p>0.99.7</dd>
<dt class="decl">void <a class="symbol _function" name="Properties.save:3" href="./htmlsrc/tango.text.Properties.html#L137" kind="function" beg="137" end="150">save</a><span class="params">(OutputStream <em>stream</em>, T[][T[]] <em>properties</em>)</span>; <span class="attrs">[<span class="stc">static</span>, <span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#Properties.save:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.Properties.html#L137">#</a></dt>
<dd class="ddef">
<div class="summary">Write properties to the provided stream</div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2004 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:36 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>